package com.lovo.psc.service;

import com.lovo.csc.dto.PurchaseTenderDto;
import com.lovo.psc.Uto.BookBean;
import com.lovo.psc.entity.Purchase;
import com.baomidou.mybatisplus.extension.service.IService;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.messaging.handler.annotation.Header;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lovo
 * @since 2022-07-08
 */
public interface IVieBookService extends IService<Purchase> {
    /**
     * 监听采购书
     * @param purchaseTenderDto
     */
    void monitorBook(Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long tag, PurchaseTenderDto purchaseTenderDto);



//    /**
//     * 根据供应商编号将标书设为中标状态
//     * 修改采购数量
//     * @param supplierNumber
//     * @param Num
//     */
//    void upDataBookNumStateBy(String supplierNumber,int Num);

    /**
     * 根据采购表id查询标书信息
     * @param id 标书id
     * @return 标书
     */
    public Purchase findPurchaseById(Integer id);

    /**
     * 查询所有标书
     * @return 标书集合
     */
    public List<BookBean> findListBookBean(String number,String id);
}
